package com.heima.user.controller;


import com.heima.common.dto.ResponseResult;
import com.heima.user.dto.LoginDto;
import com.heima.user.service.IApUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/v1/login")
@Api(tags = "app端登录")
public class LoginController {
    @Autowired
    private IApUserService apUserService;

    /**
     * app端登录
     * @param loginDto
     * @return
     */
    @PostMapping("/login_auth")
    @ApiOperation(value = "登录",notes = "author:ztz")
    @ApiImplicitParam(dataType = "LoginDto",value = "登录接收对象",name = "loginDto")
    public ResponseResult login(@RequestBody LoginDto loginDto){
        return apUserService.login(loginDto);
    }

}
